﻿<%@ Page language="c#" Codebehind="Desktop.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.Desktop" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="author" content="Herry" />
<meta name="Copyright" content="Copyright (c) 2009 himm.cn" />
<title>我的桌面</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="/css/index.css" media="screen" />
<script language="javascript">
function dialwinprocess(CurrDate,CurrTime,whichPg,TaskID)
	{
	   if(whichPg==1)
		var newdialoguewin = window.showModalDialog("/Schedule/Manage.aspx?CurrDate="+CurrDate+"&CurrTime="+CurrTime,window,"dialogWidth:1000px;DialogHeight=700px;status:no");
	   else if(whichPg==2)
	   var newdialoguewin = window.showModalDialog("/Schedule/TaskDetail.aspx?TaskID="+TaskID+"&Date="+CurrDate,window,"dialogWidth:700px;DialogHeight=600px;status:no");
	   else if(whichPg==3)
	   var newdialoguewin = window.showModalDialog("/Schedule/TaskStatus.aspx?TaskID="+TaskID+"&Date="+CurrDate,window,"dialogWidth:700px;DialogHeight=600px;status:no");
	}
</script>
</head>
<body>
<div class="m">
    <p class="path">我的桌面</p>
        <div class="con">
		<form id="Desktop" method="post" runat="server">
		<div class="hv">
		<div class="news">
		    <h3>今日任务<span class="right"><a onclick="var newwin=window.open('../Schedule/Manage.aspx','newtask','toolbar=yes,scrollbars=yes,width=800,height=600,resizable=yes');newwin.moveTo(0,0);newwin.focus();" href="#" target="_self">发布任务</a> | <a  href="../Schedule/TaskList.aspx" target="_self" title="更多">更多</a></span></h3>
		    <asp:datagrid id="dgList" runat="server" AllowPaging="True" GridLines="Horizontal" PageSize="5" DataKeyField="ID" Width="100%" PagerStyle-HorizontalAlign="center" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="2" OnPageIndexChanged="DataGrid_PageChanged" >
              <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
              <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699" VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
              <FooterStyle HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
              <Columns>
              <asp:TemplateColumn HeaderText="时段">
                <HeaderStyle CssClass="pl"></HeaderStyle>
                <ItemStyle CssClass="pl"></ItemStyle>
                <ItemTemplate>
                  <asp:Label runat="server" Text='<%# GetDateString(DataBinder.Eval(Container, "DataItem.Date").ToString())+"  "+GetPeriodByPeriodID(DataBinder.Eval(Container, "DataItem.EndTime").ToString(),DataBinder.Eval(Container, "DataItem.beginPeriodID").ToString(),(DataBinder.Eval(Container, "DataItem.endPeriodID").ToString())) %>' ID="Label2" NAME="Label2"> </asp:Label>
                </ItemTemplate>
              </asp:TemplateColumn>
              <asp:TemplateColumn HeaderText="内容">
                <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                <ItemTemplate> <a href="#" onclick='javascript:return dialwinprocess("","","2","<%# DataBinder.Eval(Container, "DataItem.TaskID") %>")'>
                  <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Subject") %>' ID="Label3" NAME="Label3"></a> </asp:Label>
                </ItemTemplate>
              </asp:TemplateColumn>
              </Columns>
              <PagerStyle Visible="False" HorizontalAlign="Right" ForeColor="White" BackColor="#93BEE2" Mode="NumericPages"></PagerStyle>
            </asp:datagrid>
		    </div>
		    
		    <div class="news_t">
		    <h3>我的文档<span class="right"><a href="NewDoc/Listview.aspx" target="_self" title="更多">更多</a></span></h3>
            <asp:datagrid id="dgDocList" runat="server" AllowPaging="True" GridLines="Horizontal"  PageSize="5" DataKeyField="DocID" Width="100%" PagerStyle-HorizontalAlign="right" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="2"  AllowSorting="True">
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
            <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699"  VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
            <FooterStyle  HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
            <Columns>
	            <asp:TemplateColumn HeaderText="文档标题">
		            <HeaderStyle CssClass="pl"></HeaderStyle>
		            <ItemStyle CssClass="pl"></ItemStyle>
		            <ItemTemplate><a href='Document/BrowseDocument.aspx?DocId=<%# DataBinder.Eval(Container.DataItem,"DocID") %>'>
				            <%# (DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Length>30)?DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Substring(0,30)+"...":DataBinder.Eval(Container.DataItem,"DocTitle").ToString() %>
			            </a>
		            </ItemTemplate>
	            </asp:TemplateColumn>
	            <asp:TemplateColumn HeaderText="审批人">
		            <HeaderStyle  Width="80px"></HeaderStyle>
		            <ItemStyle CssClass="pl"></ItemStyle>
		            <ItemTemplate>
			            <asp:Label ID="Label1" runat="server" Text='<%# GetRealName(DataBinder.Eval(Container, "DataItem.DocApprover").ToString()) %>'>
			            </asp:Label>
		            </ItemTemplate>
		            <FooterStyle></FooterStyle>
	            </asp:TemplateColumn>
            </Columns>
            <PagerStyle Visible="False" BorderStyle="Dotted" HorizontalAlign="Right" PageButtonCount="5" Mode="NumericPages"></PagerStyle>
            </asp:datagrid>
		    </div>
		    <div style="clear:left;"></div>
		</div>
		<div class="hv">
		    <div class="news_e">
		    <h3>我的邮箱<span class="right"><a href="Mail/Compose.aspx?ClassID=0" target="_self">写邮件</a> | <a href="/SubModule/UnitiveDocument/Mail/Index.aspx?classID=82" target="_self" title="更多">更多</a></span></h3>
            <asp:datagrid id="dgMailList" runat="server" AllowPaging="True" BorderColor="#E8F4FF" GridLines="Horizontal" PageSize="5" DataKeyField="MailID" Width="100%" PagerStyle-HorizontalAlign="right" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="2" AllowSorting="True">
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
            <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699" VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
            <FooterStyle  HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
            <Columns>
	            <asp:TemplateColumn HeaderText="邮件主题">
		            <HeaderStyle CssClass="pl"></HeaderStyle>
		            <ItemStyle  CssClass="pl"></ItemStyle>
		            <ItemTemplate>
			            <a href='Mail/ReadMail.aspx?FolderType=1&MailId=<%# DataBinder.Eval(Container.DataItem,"MailID") %>'>
				            <%# (DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Length>30)?DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Substring(0,30)+"...":DataBinder.Eval(Container.DataItem,"MailSubject").ToString() %>
			            </a>
			            <%# DataBinder.Eval(Container.DataItem,"attnumber").ToString()==""?"":(DataBinder.Eval(Container.DataItem,"attnumber").ToString()=="0"?"":"<img src='../../DataImages/attach.gif' border='0'>") %>
		            </ItemTemplate>
	            </asp:TemplateColumn>
	            <asp:BoundColumn DataField="MailSender" HeaderText="发送者">
		            <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
		            <ItemStyle HorizontalAlign="Center"></ItemStyle>
	            </asp:BoundColumn>
            </Columns>
            <PagerStyle Visible="False" Font-Size="12px" BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Right"
	            PageButtonCount="5" Mode="NumericPages"></PagerStyle>
            </asp:datagrid>   
		    </div>
		    
		    <div class="news_s">
		    <h3>我的审批<span class="right"><a href="Approve/Listview.aspx" target="_self" title="更多">更多</a></span></h3>
            <asp:datagrid id="dgAppDocList" runat="server" AllowPaging="True" BorderColor="#E8F4FF" GridLines="Horizontal" PageSize="5" DataKeyField="DocID" Width="100%" PagerStyle-HorizontalAlign="right" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="2" AllowSorting="True">
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
            <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699" VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
            <FooterStyle  HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
            <Columns>
	            <asp:TemplateColumn HeaderText="文档标题">
		            <HeaderStyle CssClass="pl"></HeaderStyle>
		            <ItemStyle CssClass="pl"></ItemStyle>
		            <ItemTemplate>
			            <a href='Document/ApproveDocument.aspx?DocId=<%# DataBinder.Eval(Container.DataItem,"DocID") %>'>
				            <%# (DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Length>30)?DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Substring(0,30)+"...":DataBinder.Eval(Container.DataItem,"DocTitle").ToString() %>
			            </a>
		            </ItemTemplate>
	            </asp:TemplateColumn>
	            <asp:TemplateColumn HeaderText="上传人">
		            <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
		            <ItemStyle HorizontalAlign="Center"></ItemStyle>
		            <ItemTemplate>
			            <asp:Label ID="Label4" runat="server" Text='<%# GetRealName(DataBinder.Eval(Container, "DataItem.DocAddedBy").ToString()) %>'>
			            </asp:Label>
		            </ItemTemplate>
	            </asp:TemplateColumn>
            </Columns>
            <PagerStyle Visible="False" Font-Size="12px" BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Right"
	            PageButtonCount="5" Mode="NumericPages"></PagerStyle>
            </asp:datagrid>
		    </div>
		    <div style="clear:left;"></div>
		
		</div>

		</form>
		</div>
		</div>
	</body>
</html>
